package com.quan;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;


@EnableDiscoveryClient
@EnableFeignClients
@EnableCaching
@SpringBootApplication
public class ApplicationSSO implements CommandLineRunner, DisposableBean {

	private static final Logger logger = LoggerFactory.getLogger(ApplicationSSO.class);

	public static void main(String[] args) {
		SpringApplication.run(ApplicationSSO.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		logger.info("**********************************************");
		logger.info("SSO单点服务启动.....");
		logger.info("**********************************************");
	}

	@Override
	public void destroy() throws Exception {
		logger.info("**********************************************");
		logger.info("SSO单点服务关闭.....");
		logger.info("**********************************************");
	}
	
}
